package net.joey.httpclient.youku;

import net.joey.httpclient.youku.impl.VideoAnalyServiceKu6Impl;
import net.joey.httpclient.youku.impl.VideoAnalyServiceTudouImpl;
import net.joey.httpclient.youku.utils.VideoUtils;

public class Analy {

	public static void ana(String oriUrl) {
		VideoAnalyService s = null;
		String serviceName = VideoUtils.getServiceName(oriUrl);
		System.out.println(serviceName);
		if(null != serviceName){
			if(serviceName == "videoAnalyServiceKu6Impl"){
				s = new VideoAnalyServiceKu6Impl();
			}else if(serviceName == "videoAnalyServiceTudouImpl"){
				s = new VideoAnalyServiceTudouImpl();
			}
			s.analyVideo(oriUrl);
		}
	}
	public static void main(String[] args){
		ana("v.ku6.com/special/show_4088853sdf/sZWU8A3Wsdfdf6eYhJqHr.html");
		System.out.println("--------------------------");
		ana("www.tudou.com/playlist/p/l1305332sdf6i9767sdf0152.html");
		System.out.println("--------------------------");
		ana("http://v.ku6.com/special/show_4088853/rsY0LvHGa3oPCseU.html");
		System.out.println("--------------------------");
		ana("http://www.tudou.com/playlist/p/l13053326i97670152.html");
	}
}
